 <form id="editApp" onsubmit="return false;" action="/shop/column/ajax_update" method="post" class="form-horizontal layui-form padding-top-20 validate-form" >
            <input name="id" type="hidden" value="">
            <div class="form-group">
                <label class="col-sm-2 control-label label-required">
                    排序值
                </label>
                <div class="col-sm-8">
                    <input name="sort" v-model="columnData.sort" required="required" title="必须为整数" placeholder="请输入排序值" value="" digits=true class="layui-input required ">
                    <span style="display: inline-block;">&nbsp;</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label label-required">
                    名称
                </label>
                <div class="col-sm-8">
                    <input name="name" v-model="columnData.name" required="required" title="不为空且长度不超过50" maxlength="50"  placeholder="请输入名称"  class="layui-input required">
                    <span style="display: inline-block;">&nbsp;</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">
                    logo
                </label>
                <div class="col-sm-8">
                    <img data-tips-image="" style="height:auto;max-height:32px;min-width:32px" :src="columnData.logo">
                    <input id="logo" type="hidden" name="logo" onchange="$(this).prev('img').attr('src', this.value)" v-model="columnData.logo" class="layui-input">
                    <a class="btn btn-link" data-file="one" data-uptype="local" data-type="ico,png" data-field="logo">上传图片</a>
                    <p class="help-block">请上传合理图片
                </div>
            </div>
            <div class="col-sm-4 col-sm-offset-2">
                <div class="layui-form-item text-center">
                    <button class="layui-btn" type="button" v-on:click="saveData">保存配置</button>
                </div>
            </div>
        </form>
 <script>

     require(['jquery', 'vue'], function (jquery,Vue) {
         var columnData;
         $.ajax({
             type : "POST",
             url : '/shop/column/ajax_detail',
             data :{id:transData.id},
             dataType : "json",
             async:false,
             success : function(res) {
                 console.info(res.data)
                 columnData=res.data;
             }
         });
         var vue=new Vue({
             el: '#editApp',
             data: {
                 columnData: columnData
             },
             created: function () {
             },
             methods: {
                 gernerateId: function (name, index) {
                     return name + "_" + index
                 },
                 saveData:function () {
                     columnData.logo=$("#logo").val();
                     if($("#editApp").valid()) {
                         $.ajax({
                             type : "POST",
                             url : $("#editApp").attr("action"),
                             data :columnData,
                             dataType : "json",
                             success : function(res) {
                                 if(res.errorCode=="0") {
                                     $.msg.success(res.msg);
                                 }
                                 else {
                                     $.msg.error(res.msg);
                                 }
                             }
                         });
                     }
                 }
             }
         });
         $('#app input[name="thumbnail"]').uploadOneImage();
         $('#app input[name="pics"]').uploadMultipleImage();
         $("#goodsForm").validate();
     });
 </script>